#include "src\precompiled.h"
#include "src\xray_scene_export.h"
#include "src\mesh.h"
#include "src\model.h"
#include "src\material.h"
#include "src\texture.h"
#include "src\skeleton.h"
#include "src\animation.h"

HINSTANCE g_hinstance = NULL;

class xray_scene_export_class_desc : public ClassDesc2
{
public:
	INT				IsPublic()						{ return TRUE; }
	void*			Create(BOOL loading = FALSE)	{ return new xray_scene_export; }
	const	TCHAR	*ClassName()					{ return "xray_scene_export"; }
	SClass_ID		SuperClassID()					{ return SCENE_EXPORT_CLASS_ID; }
	Class_ID		ClassID()						{ return Class_ID(0x7924251c, 0x6bff699f); }
	const TCHAR		*Category()						{ return ""; }
	const TCHAR		*InternalName()					{ return "xray_scene_export"; }
	HINSTANCE		HInstance()						{ return g_hinstance; }
}	g_xray_scene_export_class_desc;

BOOL WINAPI DllMain(HINSTANCE hinst, ULONG reason, LPVOID reserved)
{
	if(reason == DLL_PROCESS_ATTACH) {
		g_hinstance = hinst;
		DisableThreadLibraryCalls(g_hinstance);
	}
	return TRUE;
}

__declspec(dllexport) const TCHAR *LibDescription()
{
	return "xray .object Scene Exporter";
}

__declspec(dllexport) INT LibNumberClasses()
{
	return 1;
}

__declspec(dllexport) ClassDesc *LibClassDesc(int i)
{
	switch(i)
	{
	case 0:
		return &g_xray_scene_export_class_desc;
	}
	return NULL;
}

__declspec(dllexport) ULONG LibVersion()
{
	return Get3DSMAXVersion();
}

__declspec( dllexport ) int LibInitialize()
{
	return TRUE;
}

__declspec( dllexport ) int LibShutdown()
{
	return TRUE;
}